package za.co.johanmynhardt.jee.producer;

import javax.enterprise.inject.Disposes;
import javax.enterprise.inject.Produces;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import za.co.johanmynhardt.jee.repository.PostRepository;

/**
 * @author johan.mynhardt@thumbtribe.mobi
 * @version 2011.0720
 */
public class PostRepositoryProducer {
	@PersistenceContext
	EntityManager em;

	public
	@Produces
	@PostRepository
	EntityManager retrieveEntityManager() {
		return em;
	}

	public void disposeEntityManager(@Disposes @PostRepository EntityManager em) {
	}
}
